<%@page import="edu.sjsu.itack.entity.Tack"%>
<%@page import="edu.sjsu.itack.dao.TackDao"%>
<%@page import="edu.sjsu.itack.entity.Board"%>
<%@page import="edu.sjsu.itack.entity.User"%>
<%@page import="edu.sjsu.itack.dao.BoardDao"%>
<%@ page language="java" contentType="text/html; charset=US-ASCII"
	pageEncoding="US-ASCII"%>
<%@include file="header.jsp" %>

<aside class="aside">
	<ul class="nav nav-pills nav-stacked" id="myTab">
		<li class="dropdown"><a class="dropdown-toggle"
			data-toggle="dropdown" href="#">Settings<b class="caret"></b></a>
			<ul class="dropdown-menu">
				<li><a href="#profile" data-toggle="tab">Edit Profile</a></li>
				<li><a href="inviteFriends.jsp">Invite Friends</a></li>
			</ul></li>
		<li class="dropdown"><a class="dropdown-toggle"
			data-toggle="dropdown" href="#">Tacks<b class="caret"></b></a>
			<ul class="dropdown-menu">
				<li><a href="uploadWeb.jsp">Tack from Website</a></li>
				<li><a href="uploadTack.jsp">Upload tack</a></li>
			</ul></li>
		<li class="active"><a class="dropdown-toggle" href="board.jsp">Boards</a></li>
	</ul>
</aside>
<section class="section" id="section">
	<% int boardId = Integer.parseInt(request.getParameter("boardId"));
	   Tack[] tacks = new TackDao().getAllTacksForBoard(boardId);
		for (Tack tack : tacks){
	   %>

	<div class="tack">
		<h6><%=tack.getImageName() %></h6>
		<div>
			<img src="<%=tack.getImagePath() %>" style="width: 170px; height: 140px;" img-rounded">
		</div>
	</div>
	<%} %>
</section>
